<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
    <meta charset="utf-8">
    <title>收银台</title>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>

        <div><button type="button" class="btn-info" id="demoBtn1">购买</button></div>

        <form style="" id='formpay' name='formpay' method='post' action='https://gateway.xddpay.com'>
            <p> <input name='order_no' id='order_no' type='text' value=''/></p>
            <p> <input name='subject' id='subject' type='text' value=''/></p>
            <p> <input name='pay_type' id='pay_type' type='text' value=''/></p>
            <p><input name='money' id='money' type='text' value=''/></p>
            <p> <input name='app_id' id='app_id' type='text' value=''/></p>
            <p><input name='extra' id='extra' type='text' value=''/></p>
            <p> <input name='sign' id='sign' type='text' value=''/></p>
            <input type='submit' id='submitdemo1'>
        </form>
  <script src="js/jquery-3.2.1.min.js"></script>
  <script type="text/javascript">
        $("#demoBtn1").click(function () {
            $.get(
                "http://a328q37176.wicp.vip/pay/pay", {

                },
                function (data) {
                    $("#order_no").val(data.data["order_no"]);
                    $('#subject').val(data.data["subject"]);
                    $("#pay_type").val(data.data["pay_type"]);
                    $('#money').val(data.data["money"]);
                    $('#app_id').val(data.data["app_id"]);
                    $('#extra').val(data.data["extra"]);
                    $('#sign').val(data.data["sign"]);
                    //$('#submitdemo1').click();
                }, "json"
            );
        });
</script>
</body>
</html>
